<#assign base=request.contextPath />
<#assign oneLabel="ERP管理">

<#assign twoLabel="员工管理">
<#assign twoUrl=base+"/suppiler/list">

<#if employeeDO?? && (employeeDO.id)!=0>
	<#assign leafLabel="编辑员工">
	<#else>
	<#assign leafLabel="新增员工">
</#if>
<!DOCTYPE html>
<html lang="en">
<head>
	<#include "/commons/headImport.ftl">
</head>
<body>
<#include "/commons/header.ftl">
<form class="form-horizontal" name="formName" method="post">
<#include "/commons/hiddenField.ftl">
<@spring.formHiddenInput "employeeDO.id"/>
<div class="row">
	<div class="col-xs-12">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				姓名<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.fullName" "class='col-xs-10 col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.fullName" />
                <#if error??>
                	<#assign err=error?keys>
                    <#list err as k>
                        ${error['${k}']}
                    </#list>
                </#if>
			</div>
		</div>
		<div class="space-4"></div>
							
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				手机号<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.mobile" "class='col-xs-10 col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.mobile" />
			</div>
		</div>
		<div class="space-4"></div>
	
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				身份号<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.idCard" "class='col-xs-10 col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.idCard" />
			</div>
		</div>
		<div class="space-4"></div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				籍贯<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.nativePlace" "class='col-xs-10 col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.nativePlace" />
			</div>
		</div>
		<div class="space-4"></div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				入职日期<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<div class="row">
                    <div class="col-xs-8">
                        <div class="input-group input-group-sm">
                            <input type="text" readonly="true" class="form-control date-picker" name="entryDate" 
                            	value="${(employeeDO.entryDate?string('yyyy-MM-dd'))!''}" data-date-format="yyyy-mm-dd"/>
                            <span class="input-group-addon"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
            	</div>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.entryDate" />
			</div>
		</div>
		<div class="space-4"></div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				离职日期
			</label>
			<div class="col-sm-4">
				<div class="row">
                    <div class="col-xs-8">
                        <div class="input-group input-group-sm">
                            <input type="text" readonly="true" class="form-control date-picker" name="leaveDate" 
                            	value="${(employeeDO.leaveDate?string('yyyy-MM-dd'))!''}" data-date-format="yyyy-mm-dd"/>
                            <span class="input-group-addon"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
            	</div>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.leaveDate" />
			</div>
		</div>
		<div class="space-4"></div>
			
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				工资卡<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.bankNumber" "class='col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.bankNumber" />
			</div>
		</div>
		<div class="space-4"></div>
							
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				开户行<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.bankName" "class='col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.bankName" />
			</div>
		</div>
		<div class="space-4"></div>
			
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				紧急联系人<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.urgentName" "class='col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.urgentName" />
			</div>
		</div>
		<div class="space-4"></div>

		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">
				紧急联系人电话<span class="red">*</span>
			</label>
			<div class="col-sm-4">
				<@spring.formInput "employeeDO.urgentMobile" "class='col-xs-10 col-sm-8'"/>
			</div>
			<div class="help-block col-xs-12 col-sm-reset inline red">
				<@spring.showErrors "employeeDO.urgentMobile" />
			</div>
		</div>
	</div><!-- /.col -->
</div><!-- /.row -->
</form>

<div class="hr hr32 hr-dotted"></div>
<div class="clearfix">
	<div class="col-md-offset-2 col-md-9">
		<button class="btn btn-xs btn-info" type="button" id="save_id" 
			url="<#if employeeDO??&&employeeDO.id!=0>${base}/employee/edit<#else>${base}/employee/add</#if>">
			<i class="icon-save bigger-110"></i>保存
		</button>
		<button class="btn btn-xs return_class" type="button" url="${base}/employee/list">
			<i class="icon-reply bigger-110"></i>返回
		</button>
	</div>
</div>

<#include "/commons/footer.ftl">
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.min.js"></script>
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.zh-CN.js"></script>
<script>
jQuery(function($) {
	$('.date-picker').datepicker({
   		language: 'zh-CN',//选择语言
		autoclose: true,
		todayHighlight: true
	});
});
</script>
</body>
</html>
